package com.springcloud.util.model;

import com.itextpdf.text.Element;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

/**
 * @Description: TODO
 * @Create by: 123
 * @Date: 2021/11/22 17:37
 */


@Data
public class VerticalAlignment {
    private int align = Element.ALIGN_MIDDLE;

    public VerticalAlignment(String align) {
        if (StringUtils.isNotBlank(align)) {
            switch (align) {
                case "top":
                    this.align = Element.ALIGN_TOP;
                    break;
                case "bottom":
                    this.align = Element.ALIGN_BOTTOM;
                    break;
                default:

            }
        }
    }
}
